package nc.pubimpl.so.m4331.pfxx;

import nc.itf.scmpub.reference.uap.pf.PfServiceScmUtil;
import nc.pubimpl.so.pfxx.AbstractSOPfxxPlugin;
import nc.vo.pub.AggregatedValueObject;
import nc.vo.pub.BusinessException;
import nc.vo.scmpub.res.billtype.SOBillType;
import nc.vo.so.m4331.entity.DeliveryVO;












public class M4331PfxxPlugin
  extends AbstractSOPfxxPlugin
{
  public M4331PfxxPlugin() {}
  
  protected AggregatedValueObject insert(AggregatedValueObject vo) throws BusinessException
  {
    DeliveryVO[] insertvo = { (DeliveryVO)vo };
    

    DeliveryVO[] ret = (DeliveryVO[])PfServiceScmUtil.processBatch("WRITE", SOBillType.Delivery.getCode(), insertvo, null, null);
    

    if ((null == ret) || (ret.length == 0)) {
      return null;
    }
    return ret[0];
  }
  
  protected AggregatedValueObject update(AggregatedValueObject vo, String vopk) throws BusinessException
  {
    DeliveryVO[] updatevo = { (DeliveryVO)vo };
    

    DeliveryVO[] retvos = (DeliveryVO[])PfServiceScmUtil.processBatch("WRITE", SOBillType.Delivery.getCode(), updatevo, null, null);
    

    if ((null == retvos) || (retvos.length == 0)) {
      return null;
    }
    return retvos[0];
  }
}